import type { IObject } from '@/types/customs'

/** 获取路由参数 */
export function getRouteParams(): IObject {
  const curPage = getCurrentPages()
  if (!curPage.length) { return {} }

  const currentPage = (curPage[curPage.length - 1] as unknown as IObject).$page
  if (!currentPage) { return {} }
  const options = currentPage.options || {}

  return options
}
